<template>
  <div class="Footer">
    <ul>
      <li
        :class="{ active: item.id == id }"
        @click="add(item.id)"
        v-for="item in list"
        :key="item.id"
      >
        {{ item.name }}
      </li>
    </ul>
  </div>
</template>
<script>

export default {
  name: 'SON',

  props: {
    list: {
      type: Array
    }
  },
  data () {
    return {
      id: ''
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    add (id) {
      this.id = id

    }
  }
}
</script>
<style   scoped>
* {
  margin: 0;
  padding: 0;
}
ul {
  display: flex;
  list-style: none;
  background-color: pink;
  height: 80px;
}
ul .active {
  background-color: skyblue;
}
ul li {
  flex: 1;
  height: 80px;
  line-height: 80px;
  text-align: center;
}
</style>
